<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
	.messageTable{
		border: 1px solid silver;
	}
	p{
		font-size: 12px;
	}
</style>
</head>
<body>
<p>
	<c:set var="pb" value="${requestScope.lvo.pagingBean}"></c:set>
	<c:if test="${pb.previousPageGroup}">
		<a href="${initParam.root }messenger/auth_messengerPopup.do?tab=2&sentMessagePage=${pb.startPageOfPageGroup-1}">◀</a>	
	</c:if>
	<c:forEach var="i" begin="${pb.startPageOfPageGroup}" end="${pb.endPageOfPageGroup}">
	<c:choose>
		<c:when test="${pb.nowPage!=i}">
			<a href="${initParam.root }messenger/auth_messengerPopup.do?tab=2&sentMessagePage=${i}">${i}</a> 
		</c:when>
	<c:otherwise>
		<font style="color: red; font-size: 10.5pt;">${i}</font>
	</c:otherwise>
	</c:choose>
	</c:forEach>	 
	<c:if test="${pb.nextPageGroup}">
		<a href="${initParam.root }messenger/auth_messengerPopup.do?tab=2&sentMessagePage=${pb.endPageOfPageGroup+1}">▶</a>
	</c:if>
</p>
<c:forEach var="msgvo" items="${requestScope.lvo.list}">
	<table width="550" style="word-wrap: break-word; table-layout: fixed" class="messageTable">		
		<tr>
			<td align="left" width="150"><b>receiver</b> | ${msgvo.receiver}</td>				
			<td align="left"><b>date</b> | ${msgvo.date}</td>
			<td align="right" rowspan="2" valign="top">
				<c:forEach items="${msgvo.fileList}" var="fileList">
					<a href="${initParam.root}messenger/auth_fileDownload.do?newfilename=${fileList.MSG_NEWFILE_NAME}&orgfilename=${fileList.MSG_ORGFILE_NAME}&msgfileno=${fileList.MSG_FILE_NO}">${fileList.MSG_ORGFILE_NAME}</a><br>
				</c:forEach>
			</td>
		</tr>
		<tr>
			<td colspan="2"><pre width="450" style="width:100%; height:80%; overflow:auto;">${msgvo.content}</pre></td>
		</tr>
	</table>
	<br>
</c:forEach>
</body>
</html>